<%--
  Created by IntelliJ IDEA.
  User: tugou
  Date: 2017/5/1
  Time: 14:53
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"
          name="viewport" id="viewport">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>文件列表</title>
    <script src="<%=basePath%>js/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>css/main.css">
    <script>
        obj = document.getElementsByName('studentId');
        function allCheck() {
            if ($("#allCheck").is(':checked')) {
                for (var i = 0; i < obj.length; i++) {
                    obj.item(i).checked = true;
                }
            } else {
                for (var i = 0; i < obj.length; i++) {
                    if (obj.item(i).checked) {
                        obj.item(i).checked = false;
                    }
                }
            }
        }
        function itemClick() {
            for (var i = 0; i < obj.length; i++) {
                if (!obj.item(i).checked) {
                    document.getElementById("allCheck").checked = false;
                    break;
                } else {
                    document.getElementById("allCheck").checked = true;
                }
            }
        }
        function exportCommit() {
            var checkValue = "";
            for (var i = 0; i < obj.length; i++) {
                if (obj.item(i).checked) {
                    var itemVal = (obj.item(i).value);
                    checkValue = (checkValue.length == 0) ? itemVal : (checkValue + "," + itemVal);
                }
            }
            if (checkValue.length == 0) {
                alert("请至少选择一项导出");
                return;
            }
            window.open("<%=basePath%>sys/download/" + checkValue);
        }
    </script>
</head>
<body>
<header>

    <h1><a href="./index.html">首页</a></h1>

</header>
<div id="sidebar">
    <ul>
        <li><a href="<%=basePath%>sys/index/1"><i class="icon icon_home"></i><span>首页</span></a></li>
    </ul>
</div>
<div id="content">
    <div class="title_h1">
        <h1>学员信息管理</h1>
    </div>
    <div class="setting">
        <div id="datelist">
            <div class="datelist_title">
                <div class="icon_align_justify"></div>
                <h1>学员信息列表</h1>
            </div>
            <table class="datetable">
                <thead>
                <tr>
                    <th>文件名称</th>
                    <th>拍摄时间</th>
                    <th>图片数量</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <thead>
                <c:forEach var="dir" items="${dirList}">
                    <tr>
                        <td>${dir.dirName}</td>
                        <td>${dir.dirCreateData}</td>
                        <th>${dir.fileNum}</th>
                        <td><a href="<%=basePath%>photo/showPhoto/${dir.dirName}" style="color: #139ff7" target="_blank">查看</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
            <!--<div class="datatables_toolbar">
            <div class="datatables_paginat"><a href="#">首页</a><a href="#">上一页</a><a class="active" href="#">1</a><a href="#">2</a><a href="#">3</a><a href="#">下一页</a><a href="#">尾页</a></div>
            </div>-->
        </div>
    </div>
    <footer>© 2014 All Rights Reserved</footer>
</div>
</body>
</html>
